local Class = require('lua.lang.Class')
local SemanticInfo = require('lua.vm.compiler.SemanticInfo')

--- @protected
--- @class Token : Class
--- @field token number
--- @field semanticInfo SemanticInfo
local Token = Class {}

--- @protected
--- @return Token
function Token:new()
	--- @type Token
	local o = {
		semanticInfo = SemanticInfo:new(),
		token = 0
	}
	return setmetatable(o, Token)
end

--- @protected
--- @param other Token
--- @return void
function Token:set(other)
	self.token = other.token
	self.semanticInfo.numericValue = other.semanticInfo.numericValue
	self.semanticInfo.stringValue = other.semanticInfo.stringValue
end

return Token